



//
//  DistrictModel.m
//  Food choices
//
//  Created by xalo on 16/2/26.
//  Copyright © 2016年 张广斌. All rights reserved.
//

#import "DistrictModel.h"
#import "Biz_areaModel.h"

@implementation DistrictModel

-(void)setValue:(id)value forKey:(NSString *)key
{
    if ([key isEqualToString:@"district_id"]) {
        self.district_id = [NSString stringWithFormat:@"%ld",[value integerValue]];
    }
    
    if ([key isEqualToString:@"district_name"]) {
        self.district_name = [value stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
    }
    
    if ([key isEqualToString:@"biz_areas"]) {
        
        for (NSDictionary *dic in value) {
            
            Biz_areaModel *biz = [[Biz_areaModel alloc] init];
            [biz setValuesForKeysWithDictionary:dic];
            
            [self.biz_areas addObject:biz];
        }
        
    }
}
-(NSMutableArray *)biz_areas
{
    if (_biz_areas == nil) {
        self.biz_areas = [NSMutableArray array];
    }
    return _biz_areas;
    
}



@end
